// 导入
import VueRouter from 'vue-router'

// 导入组件
import home from './components/tabbar/home.vue'
import menber from './components/tabbar/menber.vue'
import shopcar from './components/tabbar/shopcar.vue'
import search from './components/tabbar/search.vue'

import newsList from './components/news/newlist.vue'
import newsInfo from './components/news/newinfo.vue'


import photoList from './components/photos/photolist.vue'
import photoInfo from './components/photos/photoinfo.vue'

import goodlist from './components/goods/goodlist.vue'
import goodinfo from './components/goods/goodinfo.vue'

// 创建路由对象
var router = new VueRouter({
    routes: [
        { path: "/", redirect: "/home" },
        { path: "/home", component: home },
        { path: "/menber", component: menber },
        { path: "/shopcar", component: shopcar },
        { path: "/search", component: search },
        { path: "/home/newslist", component: newsList },
        { path: "/home/newinfo/:id", component: newsInfo },
        { path: "/home/photoList", component: photoList },
        { path: "/home/photoinfo/:id", component: photoInfo },
        { path: "/home/goods", component: goodlist },
        { path: "/home/goodsinfo/:id", component: goodinfo },
    ],
    linkActiveClass: "mui-active" //设置激活类（路由高亮）
})
export default router